package com.pattern.factory;

/***
 * 工厂模式
 */
public class PeopleFactory {

        public People getPeople(String name){
            if(name.equals("Xiaoming")){
                return new Xiaoming();
            }else if(name.equals("Xiaohong")){
                return new Xiaohong();
            }
            return null;
        }



}
